<table class="data-show">
  <thead>
    <tr>
      <th width="300">测评标题</th>
      <th width="110">所属类型</th>
      <th width="170">测评时间</th>
      <th width="120">操作</th>
    </tr>
  </thead>
  <tbody>
    <?php $i = 0 ?>
    <?php foreach ($sf_user->getTestList() as $test): ?>
    <tr<?php ($i++ % 2 === 0) and print ' class="odd"' ?>>
      <th>
        <a href="<?php echo url_for('@paper?id='.$test['paper']['id']) ?>"><?php echo $test['paper'] ?></a>
      </th>
      <td>
        <?php if ($test['element_id'] == 0): ?>
        特殊
        <?php else: ?>
        <?php echo Element::getNameById($test['element_id']) ?>
          <?php if ($test['sub_element_id'] != 0): ?>带
            <?php echo Element::getNameById($test['sub_element_id']) ?>
          <?php endif ?>
        <?php endif ?>
      </td>
      <td>
        <?php echo $test['created_at'] ?>
      </td>
      <td>
        <a href="<?php echo url_for('@test?id='.$test['id']) ?>">查看报告</a>
      </td>
    </tr>
    <?php endforeach ?>
  </tbody>
</table>
